#include <string>
#include <vector>
#include <set>
#include <map>

class supportedAlphabetHolder {
public:
	static void Alphabet( std::vector<char>& _alphabet );
};

class wordDistortionGenerator {
public:
	void generateOneEditOperatonDistortion( const std::string& token, std::vector<std::string>& distortion, bool allowTransposition = false ) const;
	void generateTwoEditOperatonLocalityDistortion( const std::string& token, std::vector<std::string>& distortion, bool allowTransposition = false ) const;

	void generateWeightedOneEditOperatonDistortion(
		const std::string& token,
		std::vector<std::string>& distortion,
		std::vector<double>& weightes,
		bool allowTransposition = false
	) const;

	void generateWeightedTwoEditOperatonLocalityDistortion(
		const std::string& token,
		std::vector<std::string>& distortion,
		std::vector<double>& weightes,
		bool allowTransposition = false
	) const;

	void generateTokenCuts( const std::string& token, std::vector<std::pair<std::string, std::string> >& cuts ) const;

	wordDistortionGenerator() { supportedAlphabetHolder::Alphabet( alphabet ); }

private:
	std::vector<char> alphabet;

	void addTokenDistortionToSet( const std::string& token, std::set<std::string>& _set, bool allowTransposition ) const;
	void addWeightedTokenDistortionToMap( const std::string& token, double currErr, std::map<std::string, double>& _map, bool allowTransposition ) const;
};